﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Deployment.Application;
using System.Diagnostics;


namespace RMA.Pantallas
{
    public partial class frmEntrada : Form
    {
        
        int total = 5;
        public frmEntrada()
        {
            InitializeComponent();
            
        }

        private void frmEntrada_Load(object sender, EventArgs e)
        {
            timer1.Enabled = true;
            if (ApplicationDeployment.IsNetworkDeployed)
            {
                string Mayor = ApplicationDeployment.CurrentDeployment.CurrentVersion.Major.ToString();
                string Menor = ApplicationDeployment.CurrentDeployment.CurrentVersion.Minor.ToString();
                string Private = ApplicationDeployment.CurrentDeployment.CurrentVersion.Revision.ToString();
                lblVersion.Text = "V" + Mayor + "." + Menor + "." + Private;
            }
            else
            {
                lblVersion.Text = "V1.0.0";
            }
            
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            timer2.Enabled = true;
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            timer2.Enabled = false;
            total--;
            if (total <= 0)
            {
                this.Close();
            }
            else
            {
                this.Opacity -= 0.4F;
                timer2.Enabled = true;
            }
        }
        



    }
}
